from mask_rcnn import MASK_RCNN
from PIL import Image

mask_rcnn = MASK_RCNN()

img = './imgs/' + input('输入imgs文件夹中的测试图片名:')
try:
    image = Image.open(img)
except:
    print('Error! Please check your project again!')
else:
    image = mask_rcnn.detect_image(image)
    image.show()

mask_rcnn.close_session()
